<%--
 *  File:    FileCycleLog.jsp
 *  @Author: youlv
 *  Date:    2016/02/26
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<% //--------------------------------------  setting logger --%>
<%
  	Category cat = Category.getInstance("jsp.FileCycleLog"); 

  //init param
  String strModuleName = "CM";
  String privilegeCode = "E0544";
  String contextPath = request.getContextPath();
  String strTableName = "v_datafiledellog";
%>
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>FileCycle</title>
<PageFlow:CheckPageFlow pageName="p_filecyclelog"/>
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/FuncLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>
<script>

function page_summary(actionvalue,orderbyname){
  var editform = summaryPrepare(cform,actionvalue,orderbyname);
  editform.action = "FileCycleLog.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_self";
  isRunning = true;
  editform.submit();  
}

</script>
</head>
<body>
<% //--------------------------------------  page location --%>
<%@ include file="/inc/PageLocation.inc" %>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
<form name="cform" method="post" action="<%=contextPath %>/Dispatcher"  target="_self">
	<input type="hidden" name="pagename" value="p_filecyclelog">
	<input type="hidden" name="actionname">
	<custom:hidden property="processtype"/>
	<custom:hidden property="languagecode" scope="session"/>
  <tr>
    <td> 
      <table width="100%" border="0" cellspacing="0">  
         <%@ include file="/inc/SummarySearch.inc" %>
       </table>
    </td>
  </tr>
   
  <tr> 
    <td colspan="2"> 
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
         <tr  class="deepblue-left"> 
            <td width="10%" class="title_center"><%= label.getLabelName("L_Sortno") %></td>
            <td width="*" class="title_center"><%= label.getLabelName("L_filename")%></td>
            <td width="20%" class="title_center"><%= label.getLabelName("L_Operater") %></td>
            <td width="20%" class="title_center"><%= label.getLabelName("L_OperationTime") %></td>
         </tr>
         <%
             int i = 0;
             String strClassType = new String(); 
             Vector totalsummary = (Vector)pageContext.getAttribute("totalsummary");
             if(totalsummary == null) totalsummary = new Vector();
          %>
          <logic:iterate id="summary" collection="<%= totalsummary %>">                      
         <%
            HashMap summaryMap = (HashMap)pageContext.getAttribute("summary");
            if(summaryMap == null) summaryMap = new HashMap();
            //String strIsChecked = new String("");
            //Integer sta = (Integer)summaryMap.get("status");
            //int status = 10;
            //if(sta != null){
            	//status = sta.intValue();
            //}
            if(i%2 == 1){
              strClassType = "td-listrom";             
            }else{                    
              strClassType = "";
            }
              
            i++;     
          %>
           <tr onmouseover="this.className='tr-over'" onmouseout="this.className='<%=JspHelper.filterNull(strClassType)%>'" class="<%=JspHelper.filterNull(strClassType)%>">
            <td><%=i %></td>
            <td><custom:write property="filename" name="summary" nbsp="true"/></td>
            <td><custom:write property="employeename" name="summary" nbsp="true"/></td>
            <td><custom:write property="createdate" name="summary" nbsp="true" dataType="date" dataFormat="yyyy-MM-dd"/></td>
          </tr>
          </logic:iterate>
          <input type="hidden" name="numrows" value="<%=totalsummary.size()%>"/>
      <% //--------------------------------------  flipping page --%>
      <%@ include file="/inc/SummaryAction.inc" %>
      </table>
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr> 
          <td class="summary_top"></td>
        </tr>
        <tr> 
          <td class="td_center">
<%--             <a onclick="page_delete()"><custom:button type="1" label="L_Delete" imgsrc="edit.gif" border="0" style="width:80" privilegeCode="MB-WJHSZ01"/></a> --%>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </form>
</table>
</body>
</html>